package com.rongshu.sendmessage.util;

import android.content.Context;

import com.rongshu.sendmessage.base.MyApplication;
import com.rongshu.sendmessage.util.httpUtil.HYContent;

import org.json.JSONObject;

import java.util.HashMap;
import java.util.Map;

public class ClientPublicParamUtil {
    public static String getPublicParams(Context context){
        String userId = MyApplication.mSettings.getString(HYContent.UserId, "");
        String virtualDeviceNumber = MyApplication.mSettings.getString(HYContent.VirtualDeviceNumber, "");
        Map<String,String> map=new HashMap<>();
        map.put("clientType","Android");
        map.put("equipmentNumber",APKVersionCodeUtils.getDivece(context));
        map.put("virtualDeviceNumber",virtualDeviceNumber);
        map.put("versionName","容运宝Android"+APKVersionCodeUtils.getVerName(context));
        map.put("version",APKVersionCodeUtils.getVerName(context)+"");
        map.put("userId",userId);
        JSONObject jo=new JSONObject(map);
        return jo.toString();
    }
}
